package com.ruoyi.web.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.PubSpiderImg;
import com.ruoyi.system.service.IPubSpiderImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 图片管理Controller
 * 
 * @author gongxt
 * @date 2024-09-10
 */
@RestController
@RequestMapping("/web/spiderImg")
public class WebSpiderImgController extends BaseController
{
    @Autowired
    private IPubSpiderImgService pubSpiderImgService;

    /**
     * 查询图片管理列表
     */
    @GetMapping("/list")
    public TableDataInfo list(PubSpiderImg pubSpiderImg)
    {
        startPage();
        List<PubSpiderImg> list = pubSpiderImgService.selectPubSpiderImgList(pubSpiderImg);
        return getDataTable(list);
    }

    /**
     * 获取图片管理详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(pubSpiderImgService.selectPubSpiderImgById(id));
    }
}
